import actions from './actions';
import getters from './getters';


const state = {
  baseappLoading: false,
  loadingTextType: 0,
  loadingText: '',
  openid: '',
  urlData: {},
  cardTyObj: {
    1: '五',
    2: '一',
    3: '劳',
    4: '动',
    5: '奖',
  },
};

const mutations = {
  setRouteLoading(states, data) {
    state.baseappLoading = data;
  },
  openbaseappLoading(states, loadingText) {
    state.baseappLoading = true;
    state.loadingTextType = loadingText ? 1 : 0;
    state.loadingText = loadingText;
  },
  closebaseappLoading() {
    state.baseappLoading = false;
    state.loadingTextType = 0;
    state.loadingText = '';
  },
  setUrlData(states, data) {
    state.urlData = data;
  },
};

export {
  actions,
  mutations,
  state,
  getters,
};
